package com.example.springbeaninit;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

/**
 * @program my-project-model
 * @description:
 * @author: lee
 * @create: 2023/02/19 12:06
 */
@Configuration
@ComponentScan(basePackages = {"com.example.springbeaninit"})
@ImportResource(value = {"classpath:applicationContext.xml"})
public class RootConfig {
    @Bean
    public DemoService demoService() {
        DemoService demoService = new DemoService();
        demoService.setTag("anno");
        return demoService;
    }
}
